-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alter text for view-only users is ReportError. #6292
Alter text for view-only users is ReportError. #6292
Conversation
Size Change: +836 B (0%) Total Size: 1.36 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sashadoes I have requested one small change regarding the CTA display. Thank you for your work on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sashadoes It looks like updating the showRequestAccessURL
variable was missed out. It also needs to be falsey for a view-only user.
Otherwise, there is a chance it could show the Request access
CTA for a view-only user, which this issue is trying to prevent. See screenshot:
Back to you for another update. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sashadoes This looks good so far.
I apologise for not noticing this earlier, it looks like adding a test case for this change was mentioned in the IB, but it was missed in the implementation. Could you add a test case covering the change in assets/js/components/ReportError.test.js
?
Thanks for your patience!
@nfmohit makes sense , thanks :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @sashadoes. I've left a few comments on the test case.
{ | ||
registry, | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The render
function only accepts two parameters. The viewContext
property needs to be adjacent to the registry
property in the second parameter object.
const { queryByText } = render( | ||
<ReportError | ||
moduleSlug={ moduleName } | ||
error={ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this test does pass, but it doesn't serve our purpose of coverage. This <ReportError />
component doesn't show the Retry
button anyway, in any view context. For it to show, the selector should be getReport
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to avoid the back-and-forth, I've made the changes myself. Thank you, @sashadoes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
Addresses issue:
Relevant technical choices
PR Author Checklist
Do not alter or remove anything below. The following sections will be managed by moderators only.
Code Reviewer Checklist
Merge Reviewer Checklist